/**
 * 
 */
package com.us.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

import org.nutz.mvc.Mvcs;
import org.nutz.mvc.NutFilter;
import org.nutz.mvc.RequestPath;

/**
 * @author monlyu
 *         默认得适配器
 */
public class DefaultFilter extends NutFilter {

    @Override
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
        RequestPath path = Mvcs.getRequestPathObject((HttpServletRequest) req);
        // com.us.
        System.out.println("请求路径:" + path.getPath());
        super.doFilter(req, resp, chain);
    }
}
